Manchester | 26-ITP-jan | Liban Jama | Sprint 3 | Alarm Clock#1075
Open
libanj0161 wants to merge 5 commits intoCodeYourFuture:mainfrom
Open
Manchester | 26-ITP-jan | Liban Jama | Sprint 3 | Alarm Clock#1075libanj0161 wants to merge 5 commits intoCodeYourFuture:mainfrom
libanj0161 wants to merge 5 commits intoCodeYourFuture:mainfrom
Conversation
Luro91
reviewed
Apr 4, 2026
There was a problem hiding this comment.
The alarm clock looks really nice now. Good job
Comment on lines
+15
to
+19
| <div class="button-group"> | ||
| <button id="set" type="button">Set Alarm</button> | ||
| <button id="stop" type="button">Stop Alarm</button> | ||
| </div> | ||
| </div> |
There was a problem hiding this comment.
How can you format the code to indicate more clearly the hierachy of HTML elements (what is a children of what)
| } | ||
|
|
||
| function setAlarm() { | ||
| let seconds = parseInt(document.getElementById("alarmSet").value); |
There was a problem hiding this comment.
What happens when the user enters a negative number or a string value?
|
|
||
| function setAlarm() { | ||
| let seconds = parseInt(document.getElementById("alarmSet").value); | ||
| clearInterval(countdown); |
There was a problem hiding this comment.
Nice clearing of the interval to ensure only one countdown is running at all times
Sprint-3/alarmclock/alarmclock.js
Outdated
|
|
||
| if (seconds <= 0) { | ||
| clearInterval(countdown); | ||
| document.body.classList.add("alarm-finished") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Learners, PR Template
Self checklist
Changelist
Completed Alarm Clock App
Questions
N/A.